<!doctype html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <title>Document15</title>

    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css" rel="stylesheet"
          crossorigin="anonymous"/>
</head>
<body>
<div class="container">
    <h2 class="page-header">promise关键问题-then返回结果特点</h2>
</div>
<script>
    let p1 = new Promise((resolve, reject) => {
        resolve(345);       // pending => fulfilled
    });

    const result = p1.then(value=>{
        console.log(value);
        // 抛出异常
        throw '出了问题'

    }, reason => {
        console.log(reason)
    })
    console.log(111)
    console.log(result);

</script>

</body>
</html>
